import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './components/app/app.component';
import { FooterComponent } from './components/footer/footer.component';
import { CarouselComponent } from './components/carousel/carousel.component';
import { NavbarComponent } from './components/navbar/navbar.component';
import { ProductComponent } from './components/product/product.component';
import { SearchComponent } from './components/search/search.component';
import { StartsComponent } from './components/starts/starts.component';
import {AppRoutingModule} from './app-routing.module';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {HttpClientModule} from '@angular/common/http';
import { HomeComponent } from './components/home/home.component';
import { Code404Component } from './components/code404/code404.component';
import { ProductDetailComponent } from './components/product-detail/product-detail.component';
import {ProductDescComponent} from "./components/product-desc/product-desc.component";
import {ProductService} from "./service/product/product.service";
import { MyPipe } from './pipe/my/my.pipe';
import {HashLocationStrategy, LocationStrategy} from "@angular/common";

@NgModule({
  declarations: [
    AppComponent,
    FooterComponent,
    CarouselComponent,
    NavbarComponent,
    ProductComponent,
    SearchComponent,
    StartsComponent,
    HomeComponent,
    Code404Component,
    ProductDescComponent,
    ProductDetailComponent,
    MyPipe
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    FormsModule,
    HttpClientModule,
    /*响应式模块*/
    ReactiveFormsModule
  ],
  providers: [ProductService,{provide: LocationStrategy, useClass: HashLocationStrategy}],
  bootstrap: [AppComponent]
})
export class AppModule { }
